package loader;

import java.util.ArrayList;
import java.util.HashMap;

/**
 * @说明 该接口是json里面所有元素的接口，该接口为空接口
 * @author 黄锐恒
 *
 */

public interface JSONValue {

}

/**
 * @说明 下面所有的类，包括JSONObject,JSONArray,JSONString,JSONInt,JSONFloat,JSONBool,均为json的数据类型，最常用为JSONObject
 * @author 黄锐恒
 *
 */




class JSONObject extends HashMap<String,JSONValue> implements JSONValue{}
class JSONArray extends ArrayList<JSONValue> implements JSONValue{}
class JSONString implements JSONValue{
	String str;
	public JSONString(String str){
		this.str=str;
	}
	public String get(){
		return this.str;
	}
	public void set(){
		this.str=str;
	}
	
	public String toString(){
		return "\"" + str + "\"";
	}
	


}
class JSONInt implements JSONValue{
	int i;
	public JSONInt(int i){
		this.i=i;
	}
	public int get(){
		return this.i;
	}
	public void set(){
		this.i=i;
	}
	public String toString(){
		return " "+i;
	}
}
class JSONFloat implements JSONValue{
	float flo;
	public JSONFloat(float flo){
		this.flo=flo;
	}
	public float get(){
		return this.flo;
	}
	public void set(){
		this.flo=flo;
	}
	public String toString(){
		return " "+flo;
	}
}
class JSONBool implements JSONValue{
	boolean boo;
	public JSONBool(boolean boo){
		this.boo = boo;
	}
	public boolean get(){
		return this.boo;
	}
	public void set(){
		this.boo=boo;
	}
	public String toString(){
		return " "+boo;
	}
}